/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package manejoDB;
import java.sql.SQLException;



public class ManejadorDB {
    
    private ConexionDB abm_consulta ;
    private static ManejadorDB manejador;
    ConexionDB conexion;
    //Constructor : crea 
    private ManejadorDB() throws SQLException{
        this.conexion=new ConexionDB();
        this.conexion.conectar();
    };
    
    public static ManejadorDB getManejador() throws SQLException{
        if (manejador==null){
            manejador=new ManejadorDB();
        }
        return manejador;
    }
    
    public ConexionDB getConexion(){
        return this.conexion;
    }
    
    //Conexion
    public Boolean Conectar() throws SQLException{
        return this.abm_consulta.conectar();
    }
    public void Desconectar()throws SQLException{
        this.abm_consulta.cierraConexion();
    }
    
}  
    
    
    